#include "joui.h"
using namespace JOUI;

void testimagebox(HWND hWnd)
{
	auto window = new UIWnd(0, 0, 1050, 420, L"hello Imagebox", 0, 0, wws_button_close | wws_button_min | wws_button_max |
		wws_centerwindow | wws_escexit | wws_title | wws_sizeable | wws_moveable, hWnd);
	window->SetBackgColor(UIColor(253, 253, 255, 255));
	window->SetBorderColor(UIColor(20, 126, 255, 255));
	window->SetShadowColor(UIColor(20, 126, 255, 155));
	window->SetRadius(10);

	auto imagebox1 = new UIImageBox(window, 20, 50, 200, 200);
	imagebox1->SetImg(L"icons\\1.jpg");
	imagebox1->SetRadius(100, 100, 100, 100);
	auto imagebox2 = new UIImageBox(window, 230, 50, 200, 200);
	imagebox2->SetFit(UIImageBox::image_fit::contain);
	imagebox2->SetImg(L"icons\\1.jpg");
	auto imagebox3 = new UIImageBox(window, 440, 50, 200, 200);
	imagebox3->SetFit(UIImageBox::image_fit::cover);
	imagebox3->SetImg(L"icons\\1.jpg");
	auto imagebox4 = new UIImageBox(window, 650, 50, 200, 200);
	imagebox4->SetFit(UIImageBox::image_fit::none);
	imagebox4->SetImg(L"icons\\1.jpg");
	auto imagebox5 = new UIImageBox(window, 860, 50, 200, 200);
	imagebox5->SetFit(UIImageBox::image_fit::scale_down);
	imagebox5->SetImg(L"icons\\1.jpg");

	window->Show();
}